#include <iostream>
#include <windows.h> 
using namespace std;
const double inf=0x7fffffff;
int time=1;


double func(double x,double a,double b,double c){
	return a*x*x+b*x+c;
}

int cac(int n,double a,double b,double c,double l,double r,double ans){
	time = 1;
	double x[n];
	double y[n];
	do{
		time++;
		for(int i=1;i<=n;i++)
			x[i-1] = i*(r-l)/n+l;
		for(int i=0;i<n;i++)
			y[i] = func(x[i],a,b,c);
		double min=inf;
		int index=-1;
		for(int i=0;i<n;i++){
			if(y[i] < min){
				index = i+1;
				min = y[i];
			}
		}
		double left,right;
		left = (index-1)*(r-l)/n+l;
		right = (index+1)*(r-l)/n+l;
		l = left;
		r = right;
	}while(r-l > 0.001);
	if(l-ans > 0.001  ||  l-ans < -0.001)
		return -1;
	else
		return time*n;
}



int main(){
	freopen("output.txt","w",stdout);
	while(true){
		double a,b,c;
		cin>>a>>b>>c;
		double l,r,ans;
		cin>>l>>r>>ans;
		for(int i=3;i<=15;i++)
			cout<<cac(i,a,b,c,l,r,ans)<<" ";
		cout<<endl;
	}
	return 0;
}
